home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / answers / fortran-faq < prev    next >
Encoding:
Internet Message Format  |  1993-05-27  |  61.5 KB

  1. Path: senator-bedfellow.mit.edu!enterpoop.mit.edu!usc!cs.utexas.edu!uunet!olivea!sun-barr!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!appserv.Eng.Sun.COM!appserv!khb
  2. From: khb@chiba.Eng.Sun.COM (Keith Bierman-khb@chiba.eng.sun.com::SunPro)
  3. Newsgroups: comp.lang.fortran,comp.answers,news.answers
  4. Subject: Fortran FAQ
  5. Followup-To: comp.lang.fortran
  6. Date: 25 May 93 16:16:12
  7. Organization: SunPro
  8. Lines: 1461
  9. Approved: news-answers-request@MIT.Edu
  10. Distribution: world
  11. Message-ID: <KHB.93May25161612@chiba.Eng.Sun.COM>
  12. NNTP-Posting-Host: chiba
  13. Xref: senator-bedfellow.mit.edu comp.lang.fortran:13993 comp.answers:800 news.answers:8788
  14.  
  15. Archive-name: fortran-faq
  16.  
  17. Frequency: mostly monthly
  18.  
  19. Here are some answers to frequently asked questions. The "author", as
  20. is the custom, has appropriated posted responses as seemed apt. I have
  21. tried to leave attributions in, as correctly as possible. To anyone
  22. who has been offended by omission or otherwise, my apologies. I shall
  23. give priority to corrections regarding attribution.
  24.  
  25. No one takes responsibility for any of this text, neither the employer
  26. of the "author", the "author", friends of the "author", pets of the
  27. "author" nor anyone else.
  28.  
  29. Your mileage WILL vary. 
  30.  
  31. If you have comments/suggestions/edit proposals please send them to me
  32. (keith.bierman@eng.sun.com). I do not promise to accept 'em. I
  33. encourage others to make better faq lists, so I can retire this one.
  34. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  35. summary of changes:
  36.  
  37. q2)  updated
  38. q14) location of cfortran.h specified.
  39. q28) added
  40. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  41.     Questions:
  42.  
  43. Q0) How should one spell FORTRAN/Fortran?
  44. Q1) Where can I get a copy of the Fortran 90 Standard? How about
  45.     electronic copies?
  46. Q2) What Fortran 90 translators are available?
  47. Q3) I have heard of fortran "lints" what are they, and where can
  48.     I get one?
  49. Q4) "Why do people use FORTRAN?, C is so much better"
  50. Q5)  Why can't I get an electronic version of the standard?
  51. Q6)  Where can I get "foo" (some random package)
  52. Q7)  Where can I get a free compiler?
  53. Q8)  What is the best compiler for a PC?
  54. Q9)  How does Fortran 90 relate to FORTRAN '77 and what is Fortran 90?
  55. Q10) My compiler is mis-behaving; who enforces the standard?
  56. Q11) What are good books on Fortran? 
  57. Q12) Are there pretty printers for FORTRAN?
  58. Q13) Why are there aimless debates?
  59. Q14) How do I call f77 from C (and visa versa)
  60. Q15) What constitutes good FORTRAN style?
  61. Q16) For whatever reasons, I want to translate my Fortran into C.
  62.      What tools are available?
  63. Q17) For whatever reasons, I want to translate my existing C code
  64.      into Fortran. What tools are available?
  65. Q18) What is preprocessing, how can it help? How can it hurt?
  66. Q19) How can I convert an existing FORTRAN 77 program to the free form
  67.      source of Fortran 90?
  68. Q20) Who creates these silly standards anyway?
  69. Q21) How can I read my VAX binary data somewhere else?
  70. Q22) My F77 program compiled ok on a <system1>, but gives me heaps of
  71.      syntax errors on a <system2>. What's wrong?
  72. Q23) My F77 program ran ok on a <system1>, but on a <system2> it just gives
  73.      me strange results. What's wrong?
  74. Q24) Is there a WEB for Fortran (and what is web anyway)?
  75. Q25) Where can I find coded BLAS (and what are coded BLAS?)
  76. Q26) How common is DO ... END DO?
  77. Q27) Where can I learn more about the history of Fortran?
  78. Q28) Fortran text editors?
  79.  
  80. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  81.  
  82. Q0)  How should one spell FORTRAN/Fortran?
  83.  
  84.     FORTRAN is generally the preferred spelling for discussions of versions of
  85.     the language prior to the current one ("90"). Fortran is the
  86.     spelling chosen by X3J3 and WG5. In this document a feeble effort
  87.     has been made to capitalize accordingly (e.g. vast existing
  88.     software ... FORTRAN vs. generic Fortran to mean all versions of
  89.     the standard, and specifically the modern dialect, ISO 1539:1991).
  90.  
  91. From: walt@netcom.com (Walt Brainerd)
  92.     There was an effort to "standardize" on spelling of programming
  93.     languages just after F77 became a standard.  The rule: if you say
  94.     the letters, it is all caps (APL); if you pronounce it as a word,
  95.     it is not (Cobol, Fortran, Ada).  See, for example the difinitive
  96.     article describing Fortran 77 in the Oct 1978 issue of the Comm.
  97.     of the ACM.  The timing was such that FORTRAN got put on the
  98.     standard itself, though many always after that have referred to
  99.     it as Fortran 77.  Of course, there are those who think it is not
  100.     truly Fortran if not written with all caps.
  101.  
  102. <ed note>
  103.  
  104.     ISO 1539:1991 and its ANSI counterpart X3.198-1992 consistently
  105.     employ the spelling "Fortran" to refer to the language being
  106.     defined. Reference(s) to the older version employ "small caps"
  107.     for the "ORTRAN" characters.
  108.  
  109.  
  110. Q1)  Where can I get a copy of the Fortran 90 Standard?
  111.  
  112. <khb> You can't get it from ftp. The various standards bodies get a
  113. substantial fraction of their income from sales of standards
  114. documents. This is unfortunate <khb> Electronic versions are
  115. available, see the note from Walt below.
  116.  
  117. From: julian@cernvax.cern.ch (julian bunn)
  118.  
  119.          The new Fortran 90 standard has now been formally published
  120.      and is available from the ISO central secretariat or from the
  121.      national member bodies. The price is about $120. Some
  122.      ordering detail follow.  I can supply addresses in other
  123.      countries not mentioned on request (to METCALF@CERNVM).
  124.  
  125.     The document reference is ISO/IEC 1539 : 1991. There is no ISBN.
  126.  
  127.     ISO
  128.     1, rue de Varembe
  129.     Case postale 56
  130.     1211 Geneva 20
  131.     Switzerland
  132.     Fax: +41 22 734 10 79
  133.  
  134.     ANSI
  135.     1430 Broadway
  136.     New York, NY 10018
  137.  
  138.     BSI
  139.     2 Park Street
  140.     London W1A 2BS
  141.  
  142.     DIN
  143.     Burggrafenstrasse 6
  144.     Postfach 1107
  145.     D-1000 Berlin 30
  146.  
  147.     AFNOR
  148.     Tour Europe
  149.     Cedex 7
  150.     92049 Paris La Defence
  151.  
  152. SCC
  153. 1200-45 O'Connor
  154. Ottawa
  155. Ontario  K1P 6N7
  156.  
  157.                             Mike Metcalf
  158.                             (metcalf@cernvm)
  159.  
  160. and from walt@netcom.com
  161.  
  162. For those of you who don't read comp.lang.fortran, you might be
  163. interested to know that I (walt brainard) just called Global
  164. Engineering to see if the sell ISO 1539:1991.  They do; the price is
  165. $225.
  166.  
  167. And 
  168.  
  169. You can obtain copies through:
  170.     Global Engineering Documents
  171.     2805 McGaw Ave.
  172.     Irvine, CA. 92714
  173.     (714) 261-1455
  174.     (800) 854-7179
  175.  
  176.  
  177. New ANSI number 
  178.             ANSI X3.198-1992
  179.  
  180. How about electronic copies?
  181. Return-Path: walt@netcom.com
  182. Subject: ISO 1539 in electronic form
  183.  
  184. In accordance with an official agreement with
  185. the International Standards Organization, Unicomp
  186. is now able to distribute electronic versions of
  187. the Fortran 90 standard: "ISO/IEC 1539 : 1991,
  188. Information technology--Programming languages--Fortran".
  189.  
  190. The money received from this effort will go partly to
  191. fund ISO activities and partly to recover the costs
  192. incurred by Unicomp in preparing and typesetting the
  193. standard document.  The prices are set by ISO.
  194.  
  195. The document can be obtained in three versions:
  196.  
  197. 1.  An ascii version suitable for viewing on a
  198.     computer terminal using any kind of editor.
  199.     Cost: USD 125.
  200.  
  201. 2.  A PostScript version with a license allowing
  202.     the purchaser to print n paper copies.
  203.     Cost: USD 125 + 10n.
  204.  
  205. 3.  Complete source in ditroff with macros and
  206.     software to extract and create the annexes.
  207.     The source constitutes a fairly high level
  208.     marked up document; for example, each program
  209.     beginning and ending is marked and there
  210.     are few low-level typographic commands such
  211.     as size and font changes.  Cost USD 1000.
  212.  
  213. I am quite enthused especially about version (2).
  214. If you want to have 10 copies for your organization,
  215. and it costs $10 to make a printed copy, then the
  216. cost to make the 10 copies would be $125 + $200,
  217. or just $32.50 per copy, which is a substantial
  218. savings over purchasing paper copies.
  219.  
  220. Versions (1) and (3) will be accompanied by a
  221. license restricting use to one CPU and prohibiting
  222. copying, except for backup purposes, etc.  The
  223. version (2) license will prohibit distributing
  224. any of the printed copies outside of the purchasing
  225. organization.
  226.  
  227. If you have special requirements, such as wanting
  228. to distribute a copy with each version of your compiler
  229. or using the source as a part of your documentation,
  230. we can make special arrangements, subject to the
  231. approval of the ISO.  Please advise me of your
  232. requirements and we can work up a proposal together.
  233.  
  234. ISO and Unicomp think this will provide the often
  235. requested access to the standard in electronic form.
  236. This is the first time this is being tried, so we hope
  237. that organizations will be careful to observe the rules
  238. and encourage the continued availability of this
  239. and other standards in electronic form.
  240.  
  241. Payment can be made by Visa or MasterCard, or with
  242. a check on a US Bank in US funds.  We <unicomp> will accept
  243. a purchase order only if the amount is $500 or more.
  244.  
  245. Walter S. Brainerd; Unicomp; phone: (415) 949-4052
  246.  email: walt@netcom.com; fax: (415) 949-4058; 
  247.  
  248.  
  249. Q2) What Fortran 90 translators are available?
  250.  
  251. From: schumanm@Informatik.TU-Muenchen.DE (Matthias Schumann)
  252. From: macphed@dvinci.USask.Ca (Ian MacPhedran)
  253.  
  254. This is the promised summary of my request for information about
  255. Fortran 90 (f90) compilers. I am sorry for the delay in getting this
  256. posted, but I was away for a week, and still haven't caught up.
  257.  
  258. I received a large amount of information, including a previous summary.
  259. Rather than parroting the entire list, I have prepared the following
  260. breakdown of the points which interested me.
  261.  
  262. ------------------------------------------------------------------------------
  263. Product:  NAGware Fortran 90 Compiler
  264. Descript: Compiles f90 code to C source, or directly to executable
  265.           file under MS-DOS. Therefore requires native C compiler
  266.           as back end on most platforms.
  267. Platform: Apollo DN10000, DECstations, HP 9000, IBM RS/6000, NeXT,
  268.           Intel 386/486 (MSDOS), Sun 3, Sun 4 (SunOS 4.1)
  269.           VAX/VMS forthcoming.
  270. Pricing:  Varies with platform. Academic Pricing available. Site
  271.           License available
  272.  +------------------------------------------------------------+
  273.  |                    NAGWare F90 Compiler                    |
  274.  +------------------------------------------------------------+
  275.  |          License Fee Options for Initial Computer          |
  276.  +------------------------------------------------------------+
  277.  |        |         Standard        |         Academic        |
  278.  +--------+-------------------------+-------------------------+
  279.  |        |  Perpetual|  Maintenance|  Perpetual|  Maintenance|
  280.  |        |     Fee   |      Fee    |     Fee   |      Fee    |
  281.  +--------+-----------+-------------+-----------+-------------+
  282.  | CLASS 1|      $895 |      $160   |      $537 |       $97   | (MSDOS)
  283.  +--------+-----------+-------------+-------------------------+
  284.  | CLASS 2|    $1,495 |      $270   |      $897 |      $162   | (Low end work-
  285.  +--------+-----------+-------------+-----------+-------------+ stations)
  286.  | CLASS 3|    $1,995 |      $360   |    $1,197 |      $215   |
  287.  +--------+-----------+-------------+-----------+-------------+
  288.  | CLASS 4|    $2,495 |      $450   |    $1,497 |      $270   | (Server class
  289.  +--------+-----------+-------------+-----------+-------------+ computers)
  290.  | CLASS 5|    $3,295 |      $594   |    $1,977 |      $356   |
  291.  +--------+-----------+-------------+-----------+-------------+
  292.  | CLASS 6|    $4,295 |      $774   |    $2,577 |      $464   |
  293.  +--------+-----------+-------------+-----------+-------------+
  294.  | CLASS 7|    $5,295 |      $945   |    $3,177 |      $572   |
  295.  +--------+-----------+-------------+-----------+-------------+
  296.           (US Dollars)
  297. Contact:  Sheila Caswell, Account Manager,
  298.           Numerical Algorithms Group, Inc.
  299.  
  300.           1400 Opus Place, Suite 200
  301.           Downers Grove, IL, USA
  302.           60515-5702
  303. Phone:    (708) 971-2337
  304. Source:   E-mail messages, postings, and paper mailing
  305. ------------------------------------------------------------------------------
  306. Product:  VAST-90
  307. Descript: Converts f77 code to f90, and reverse. Will "de-spaghettify"
  308.           f77 code to a more structured form. Requires native f77 compiler
  309.           to compile f90 programs.
  310. Platform: SPARC (Sun 4), IBM RS/6000
  311. Pricing:  Single Machine: starts at $1900, Sun, IBM HP and DEC
  312.       workstations. Higher prices for larger machines.
  313.       Included: VAST-90, f90 driver, f90 library and documentation.
  314.     
  315.           Volume discounts and site license available.
  316.  
  317. Contact:
  318. Pacific-Sierra Research Corp.               Switchboard:   (310) 314-2300
  319. 2901 28th Street                            Fax:           (310) 314-2323
  320. Santa Monica  CA  90405                     VAST-90 e-mail: dave@psrv.com
  321.  
  322. ------------------------------------------------------------------------------
  323. Product:  PF90 Version 2.0
  324. Descript: Converts f90 programs to f77, then compiles with native
  325.           f77 compiler. Therefore native f77 compiler is required.
  326. Platform: Sun 4, IBM RS/6000, Silicon Graphics, DECstations, Convex,
  327.           Alliant, IBM 3090 (AIX), Cray
  328. Pricing:  Sun, RS/6000, SGI, DECstation: $2000
  329.           Convex, Alliant: $5000; IBM 3090, Cray: $10000
  330.           (US Dollars, single machine, multiuser license, must purchase
  331.           f77 compiler separately.)
  332. Contact:  ParaSoft Corporation
  333.           2500 E. Foothill Blvd
  334.           Pasadena, CA 91107
  335. Phone:    (818) 792-9941
  336. E-mail:   f90-info@parasoft.com
  337. Source:   E-mail messages, and PostScript advertisement
  338. ------------------------------------------------------------------------------
  339. Product:   PV version 1.1 of Fortran 90 compiler
  340. Descript:  Port of NAG's f90 compiler to MS-DOS, together with Salford
  341.            Software Ltd.
  342. Platform:  Intel 386/486 Computers
  343. Pricing:   $1950.00 (single user, US currency)
  344. Contact:   OTG Systems Inc
  345. Phone:     (717) 222-9100
  346. Source:    E-mail message/summary of previous queries
  347. ------------------------------------------------------------------------------
  348. The following is from a previous summary from David Bernholdt:
  349.  
  350. Convex is reported to have an incomplete f90 compiler in beta.
  351. Other compilers in preparation will be available:
  352. EPC (Edinburgh Portable Compilers) and Lahey            late 1992
  353. Cray Research                                           early 1993
  354. DEC for VMS                                             late 1993
  355. ------------------------------------------------------------------------------
  356.  
  357. I wish to thank the following people for their help, and apologize to any
  358. which I have missed.
  359.  
  360. psrv!bob@uu.psi.com
  361. naginc!caswell@sunbird.Central.Sun.COM
  362. malcolm@nag.co.uk
  363. roman@parasoft.com
  364. khb@chiba.Eng.Sun.COM
  365. METCALF@crnvma.cern.ch
  366. ----------------------------------------------------------------------------
  367. Ian MacPhedran, Engineering Computer Centre, University of Saskatchewan.
  368. 2B13 Engineering Building, U. of S. Campus, Saskatoon, Sask., CANADA S7N 0W0
  369. macphed@dvinci.USask.CA  macphedran@sask.USask.CA
  370.  
  371. Walt Brainerd                walt@netcom.com:
  372.  
  373. Yes, a Fortran 90 system can be had for $134.
  374.  
  375. Salford FTN90 is a full PC Fortran 90 implementation based
  376. on the front end developed by the Numerical Algorithms
  377. Group, Ltd.  The Entry Level system requires that all
  378. parts of a program reside in one file (except those that
  379. are brought in with an INCLUDE line).  That file
  380. is compiled and executed without producing a permanent
  381. executable file.
  382.  
  383. It runs on a 386SX, 386DX, or 486 system with DOS 3.3
  384. or later.
  385.  
  386. Contact Unicomp for ordering information in North America.
  387. +1-415-949-4052   4058 (fax)
  388.  
  389. To find out the price and how to get it outside of North
  390. America, contact Salford Software, Venables Building,
  391. 5 Cockcroft Road, Salford, M5 4NT, United Kingdom,
  392. +44 61 745 5678, +44 61 745 5666 (fax).
  393.  
  394. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  395.  
  396.  
  397. Q3) I have heard of fortran "lints" what are they, and where can
  398.    I get one?
  399.  
  400.    Fortran compilers are not required (and most do not) to protect
  401.    users from themselves, that is to say
  402.  
  403.      call sub(1)
  404.      ...
  405.      subroutine sub(i)
  406.      i=i+10
  407.      return
  408.      end
  409.  
  410.    Is non-standard complying but the compiler need not tell you about
  411.    it. Arguably worse, the compiler can produce any result it deems
  412.    fit, up to and including the start of world war III (assuming the
  413.    right optional hardware has been installed).
  414.  
  415.    Fortran lint programs focus on searching out search programming
  416.    errors and alerting the user.
  417.  
  418.    There are a wide variety of commercial and pd products. A partial
  419.    list follows:
  420.  
  421.    IPT FORTRAN lint 1096 East Meadow Circle, Palo Alto, CA 94303, 415/494-7500.
  422.  
  423.    Forwarn from quibus 719 527 1384.
  424.  
  425.    QA-FORTRAN from PRL UK 01 942 9242 and perhaps  (817) 589 0949
  426.  
  427.    FORCHECK from Leiden University ND 31 71 276804
  428.  
  429.    FTNCHEK from netlib. One may receive FTNCHEK by mailing to
  430.    netlib@ornl.gov the following message:
  431.  
  432.     send ftnchek from fortran
  433.  
  434.     And Ajay Shah, (213)749-8133, ajayshah@usc.edu
  435.     You may want to mention f2c followed by an ANSI C compiler as a great
  436.     free fortran lint. I could not have survived writing fortran if it
  437.     were not for f2c.  You need to know some C to deal with the error
  438.     messages, but that's not a bad price to pay.
  439.  
  440. From: "John D. McCalpin" <mccalpin@perelandra.cms.udel.edu>
  441. Not too many people use it, but you might want to add TOOLPACK to
  442. the list of FORTRAN "lint" packages.  Here is the blurb that I
  443. send to people who are interested:
  444.  
  445. ======================================================================
  446. TOOLPACK is a large set of utilities written in FORTRAN to do FORTRAN
  447. code analysis and transformation.
  448.  
  449. TOOLPACK begins by actually parsing the program with a fully FORTRAN-
  450. compliant parser and then does all the code transformations on the
  451. parse and comment trees.
  452.  
  453. This means that you cannot confuse TOOLPACK by silly FORTRAN-isms that
  454. can easily overwhelm more naive utilities (such as ftnchek).  For
  455. example, TOOLPACK correctly handles statements such as:
  456.  
  457.       D O U B L E  P R E C I S I O N   A(100,100)
  458.       doubleprecision fred
  459.  
  460.       DO I = 1.2
  461.       READ(I,J) = 10.
  462.  
  463.  
  464. The usual interface to TOOLPACK is a set of 'csh' scripts that run the
  465. various TOOLPACK utilities to do specific tasks.
  466.  
  467. The ones you will find most useful are: pol, polx, apt, dapt, decs, 
  468. getlst, and discard.   These are the prettyprinter, precision converter,
  469. declaration standardizer, and some necessary utilities.  See below for
  470. more details.
  471.  
  472. By aware that TOOLPACK is *very* rigorous about the FORTRAN-77
  473. standard.  You may or may not consider this an advantage.
  474.  
  475. The scripts are described by the 'scripts' script, which delivers the
  476. following:
  477. ----------------------------------------------------------------------------
  478. In the Toolpack script summaries below, the section numbers refer to
  479. the Unix environment Users' Guide where more detailed information can
  480. be found.  To obtain on-line information about a script's usage, type
  481. its name without any arguments.
  482.  
  483. FORTRAN Analysis Facilities
  484.  
  485.   getlst  Produce a listing showing statement and token numbers. Report
  486.           lexical scanning warnings and errors. (3.1.1)
  487.  
  488.   syn     Report errors and warnings detected by lexical scanning, parsing,
  489.           and examining a set of symbol attributes. (3.1.2)
  490.  
  491.   sem     Report errors and warnings detected by lexical scanning, parsing,
  492.           and examining an extended set of symbol attributes. (3.1.3)
  493.  
  494.   pfort   Report errors and warnings detected by lexical scanning, parsing,
  495.           examining an extended set of symbol attributes, checking for unsafe
  496.           references, and checking conformance to a portable subset of
  497.           FORTRAN. (3.1.4)
  498.  
  499.   statdoc In a user-supplied report template, place information derived from
  500.           static analysis to assist in documenting the program.  Examples of
  501.           information the user may request are COMMON block usage, symbol
  502.           attributes, and a graph of subprogram calls. (3.1.5)
  503.  
  504.   inst    Instrument a FORTRAN program so that the instrumented program, when
  505.           executed, produces information about program execution. (3.2.1)
  506.  
  507.   rundoc  Execute a program instrumented by inst and, in a user-supplied
  508.           report template, place information derived from dynamic analysis
  509.           to assist in documenting the program.  For example, the user may
  510.           determine the frequency of execution of program segments. (3.2.2)
  511.  
  512. FORTRAN Transformation Facilities
  513.  
  514.   pol     Format a FORTRAN program under control of user-supplied options
  515.           in a Polish option file. (4.1.1)
  516.  
  517.   polx    Construct a Polish option file via a menu-driven editor. (4.1.2)
  518.  
  519.   decs    Rebuild the declarative part of a FORTRAN program. (4.2.1)
  520.  
  521.   apt     Transform a single-precision version of a FORTRAN program to
  522.           double precision or vice versa. (4.3.1)
  523.  
  524.   dapt    Convert precision and rebuild the declarations, combining the
  525.           functions of apt and decs. (4.3.2)
  526.  
  527.   cname   Change the names in a FORTRAN program that satisfy conditions
  528.           derived from information in either the lexical token stream or
  529.           the symbol table or both. (4.4.1)
  530.  
  531.   lname   Transform a FORTRAN program containing long names to a program
  532.           with standard names. (4.4.2)
  533.  
  534.   stf     Rebuild the flow of control in a FORTRAN program to standardized
  535.           form. (4.5.1)
  536.  
  537.   ucs     Transform nests of DO loops matching certain paradigms so that
  538.           the transformed code executes more efficiently on vector machines.
  539.           (4.6.1)
  540.  
  541. Miscellaneous Facilities
  542.  
  543.   fdiff   Compare two FORTRAN programs at the lexical token level. (5.1.1)
  544.  
  545.   dac     Compare two data files, neglecting certain formatting differences
  546.           and numerical differences smaller than a given tolerance. (5.1.2)
  547.  
  548.   vcon    Create, edit, and retrieve versions of a file contained in a
  549.           version file. (5.2.1)
  550.  
  551.   discard Remove unneeded files created by the above scripts. (5.3.1)
  552.  
  553.   scripts Print this summary of the scripts. (5.4.1)
  554.  
  555. ----------------------------------------------------------------------------
  556.  
  557. TOOLPACK can be obtained by anonymous ftp from perelandra.cms.udel.edu
  558. in the directory pub/Lang/Toolpack/.
  559. The UNIX version is in the file toolpack.tar.Z
  560. Serious hackers will want the versions in the Distrib directory.
  561.  
  562. The package is known to compile on Silicon Graphics and Sun machines,
  563. though the Makefile is reasonably braindamaged.
  564.  
  565. You will need about 16 MB for the stripped executables on an SGI machine.
  566. Figure on double that for compiling the package.....
  567.  
  568. Have fun!
  569. --
  570. John D. McCalpin            mccalpin@perelandra.cms.udel.edu
  571. Assistant Professor            mccalpin@brahms.udel.edu
  572. College of Marine Studies, U. Del.    John.McCalpin@mvs.udel.edu
  573.  
  574.  
  575.  
  576. Q4) "Why do people use FORTRAN?, C is so much better"
  577.  
  578.    One should avoid such pointless arguments .... if you feel this
  579.    way, don't subscribe to comp.lang.fortran.
  580.  
  581.    This sort of question always triggers off a protracted discussion,
  582.    the highlights of which are typically:
  583.  
  584.        a) FORTRAN and C have different semantics. A FORTRAN optimizer
  585.       knows more about aliasing, function interactions, and I/O. A
  586.       C optimizer has to infer or compute such information. C
  587.       bigots typically have neither written such optimizers nor
  588.       worked with folks who do it for a living, and are prone to
  589.       dismiss such arguments as being petty and neolithic.
  590.  
  591.       FORTRAN programmers are often a bit more in touch with high
  592.       performance computing, and are unwilling to bet that heavily
  593.       on compiler wizardry. 
  594.       
  595.       In addition, ANSI/ISO C has very tight requirements on
  596.       expression evaluation (an overreaction to the K&R ignore
  597.       parenthesis days) which cripples an optimizer even further.
  598.       The restrictions are spelled out in Section 5.1.2.3 of
  599.       ISO/IEC 9899-1990. Both the '77 and '90 Fortran standards
  600.       allow the optimizer more latitude.
  601.  
  602.       Of course, compiler options, vendor extensions and the like
  603.       sometimes narrow the difference. Also, some Fortran
  604.       compilers do not take advantage of all of these features of
  605.       the language, thus narrowing the gap in the other direction.
  606.  
  607.       On any given code, on any given system, all bets are off.
  608.  
  609.       b)  There is a vast body of existing FORTRAN code (much of which
  610.       is publically available and of high quality). Numerical
  611.       codes are particularly difficult to "vet", scientific
  612.       establishments usually do not have large otherwise idle
  613.       programming staffs, etc.  so massive recoding into any new
  614.       language is typically resisted quite strongly.
  615.  
  616.       c)  Fortran tends to meet some of the needs of scientists
  617.       better.  Most notably, it has built in support for:
  618.         - variable dimension array arguments in subroutines
  619.         - a compiler-supported infix exponentiation operator which
  620.           is generic with respect to both precision and type,
  621.           *and* which is generally handled very efficiently  or
  622.           the commonly occuring special case floating-point**small-integer
  623.         - complex arithmetic
  624.         - generic-precision intrinsic functions
  625.  
  626.       d)  Retraining staff is quite expensive.
  627.  
  628.       e)  It is sometimes argued that: 
  629. - Jonathan Thornburg <also responsible for misc. other fixups>
  630.     Fortran tends to be easier for non-experts to learn
  631.     than C, because its "mental model of the computer" is
  632.     much simpler.  For example, in Fortran the programmer
  633.     can generally avoid learning about pointers and memory
  634.     addresses, while these are essential in C.  More generally,
  635.     in Fortran the difference between (C notation) x, &x,
  636.     and often even *x is basically hidden, while in C it's
  637.     exposed.  For non-experts this makes Fortran a considerably
  638.     simpler language.
  639.  
  640.     Because of this relative simplicity, for simple programming
  641.     tasks which fall within its domain, (say writing a simple
  642.     least-squares fitting routine), Fortran generally requires
  643.     much less computer science knowledge of the programmer than
  644.     C does, and is thus much easier to use.
  645.  
  646.      
  647. Q5)  Why can't I get an electronic version of the standard?
  648.  
  649.     Someday, perhaps you can. However, at the moment the various
  650.     standards bodies finance some fraction of their work via sales of
  651.     standards documents. ISO and ANSI have both claimed copyright to
  652.     the finished standard, so those who would make and distribute
  653.     copies should be forewarned.
  654.  
  655.     It should be noted that various people are working to correct
  656.     this; but it is unlikely to ever become free.
  657.  
  658. Q6) Where can I get "foo" (some random package)
  659.  
  660. Q6) Where can I get "foo" (some random package)
  661.         contributed by:
  662.                 Marc R. Roussel
  663.                                 mroussel@alchemy.chem.utoronto.ca
  664.  
  665.     Use archie. archie is an online database of what is available and
  666.     where on the "net". Archie can be used either via telnet or by
  667.     mail. 
  668.     
  669.     For information about archie send 
  670.  
  671.     mail archie@archie.rutgers.edu
  672.     subject: help
  673.  
  674.     And you will get back copious directions on how to use archie.  If
  675.     you prefer interactive experimentation, telnet to
  676.     archie.rutgers.edu and log in as archie.  No password will be
  677.     required.  The first thing you will be shown is a list of other
  678.     archie servers.  If one of these servers is geographically much
  679.     closer to you than Rutgers, NJ, please disconnect (by typing 'quit')
  680.     and use that one.  To save you this step, here is the latest list of
  681.     archie sites:
  682.  
  683.     archie.rutgers.edu     128.6.18.15     (Rutgers University)
  684.     archie.unl.edu     129.93.1.14     (University of Nebraska in Lincoln)
  685.     archie.sura.net     128.167.254.179 (SURAnet archie server)
  686.     archie.ans.net     147.225.1.2     (ANS archie server)
  687.     archie.au         139.130.4.6     (Australian server)
  688.     archie.funet.fi     128.214.6.100     (European server in Finland)
  689.     archie.doc.ic.ac.uk  146.169.11.3     (UK/England server)
  690.     archie.cs.huji.ac.il 132.65.6.15     (Israel server)
  691.     archie.wide.ad.jp     133.4.3.6     (Japanese server)
  692.  
  693.     I believe that all of these servers run the mail server as well as
  694.     the telnet and archie server software.  (The archie server is a
  695.     third way to use archie.  It's probably the best way, but it
  696.     requires that you install software.)
  697.  
  698.     Once you logged into an archie server, you will want to make
  699.     sure that all the information you will retrieve will be mailed to
  700.     you.  Type
  701.  
  702.     set mailto userid@machine.foo.edu
  703.  
  704.     where, of course, you will substitute your own email address for the
  705.     made-up one shown above.  You are now ready to search the database.
  706.     If at any time you want to know what options are available to you,
  707.     type help.  To search for a program or file, type
  708.  
  709.     prog foo
  710.  
  711.     where foo is the name of the program or file required.  Once your
  712.     search is done, type 'mail' to have the output sent to you.  (The
  713.     output will almost always be several pages long.)  Then type 'quit' to
  714.     exit.
  715.  
  716. Q7)  Where can I get a free compiler?
  717.  
  718.     One such is f2c.
  719.  
  720. From: mwm@a.gp.cs.cmu.edu (Mark Maimone)
  721. Newsgroups: comp.lang.fortran,comp.lang.c
  722. Subject: Re: Fortran to C translator
  723. Keywords: fortran, C, translator, f2c
  724. Date: 13 Sep 90 01:43:30 GMT
  725. Organization: Carnegie-Mellon University, CS/RI
  726.  
  727.  
  728.     Since there have been several requests for a Fortran to C translator
  729. in the past week, I'm reposting the announcement about f2c.  The short
  730. answer is you can get f2c by anonymous-ftp from research.att.com in
  731. directory dist/f2c.
  732.  
  733. ------------------------------------------------------------------------------
  734.  
  735.     Source for f2c, a Fortran 77 to C translator jointly developed by
  736. folks from Bell Labs, Bellcore, and Carnegie Mellon, is now freely
  737. available.
  738.  
  739.     F2c was derived from the original UNIX operating system's f77(1),
  740. and the generated C follows f77's calling conventions; on some machines, the
  741. resulting object files are interchangeable with (and behave
  742. indistinguishably from) objects compiled by f77.  The main "advantage" of
  743. f2c is that it converts ANSI standard Fortran 77 into C without manual
  744. intervention, at least when invoked by a suitable script or makefile (that
  745. may need to exercise an f2c option to ensure that COMMON blocks are defined
  746. just once).  The main "problems" are that f2c does no code restructuring
  747. (e.g., gotos are preserved) and that Fortran I/O gets converted into a bunch
  748. of calls; thus the translated C code doesn't look too pretty, and in general
  749. one would need to maintain the Fortran rather than its translation into C.
  750. [F2c is not meant to displace the services of commercial vendors whose
  751. business is to convert Fortran into maintainable C.]
  752.  
  753.     There is a plethora of options, many of which exist to support
  754. different compilation environments for the translated C (e.g., ANSI C or C++
  755. compatibility, different type sizes, separate files for COMMON blocks to
  756. appease "smart" linkers).  So far f2c (and f2c-generated source) has
  757. compiled successfully on many machines:  Sun, Vax, IBMRT, Apollo, SGI, MIPS,
  758. and Cray to name a few.
  759.  
  760.     F2c has been under test by the net community for over a year
  761. and has been verified on the NBS tests, several large math libraries,
  762. floating point tests, even code for laying cable on the ocean floor!
  763.  
  764.     To find out about f2c, send the following E-mail message to netlib
  765. (netlib@research.att.com or research!netlib):
  766.  
  767.     send index from f2c
  768.  
  769. Your message will be answered automatically (by a program -- see CACM vol.
  770. 30 #5 (May, 1987), pp. 403-407).  You will receive a reply explaining how to
  771. automatically acquire f2c source (about 600K), f2c library source (130K),
  772. and supporting info (man page, etc).  Or you can anonymous-FTP to
  773. research.att.com and look in directory dist/f2c at these files:
  774.  
  775.     all.Z -- 250K compressed shar file for f2c
  776.     f2c.ps.Z -- 24 page tech report describing f2c
  777.     index -- general info about files
  778.     libf77.Z, libi77.Z -- compressed shar files for libraries
  779.  
  780. ****************************** DISCLAIMER ******************************
  781.          Careful! Anything free comes with no guarantee.
  782. ************************************************************************
  783.  
  784. ----------------------------------------------------------------------
  785. Mark Maimone                phone: (412) 268 - 7698
  786. Carnegie Mellon Computer Science    email: mwm@cs.cmu.edu
  787.                            cmcspt!mwm@cs.cmu.edu
  788.  
  789. Notes: f2c accepts only fairly vanilla FORTRAN; vendor supplied f77's
  790.        usually produce better quality code, and accept a wider variety
  791.        of codes. 
  792.  
  793. Q8)  What is the best compiler for a PC?
  794.  
  795.     There are many products, some are quite good. Few are free. 
  796.     f2c and gcc can be had for the PC environment. Popular ones are:
  797.  
  798.     Lahey (very fast compilation; excellent reputation for support)
  799.     Watcom (touted for good optimization)
  800.     MicroWay (support for odd floating point units)
  801.     LPI  (multi-platform support)
  802.     MicroSoft (various good hooks into windows and such)
  803.     Absoft (multi-platform support)
  804.  
  805.    It is beyond the scope of a faq to provide a commercial endorsement.
  806.  
  807. Q9) How does Fortran 90 relate to FORTRAN '77?
  808.  
  809.     With a few minor exceptions, Fortran 90 is a superset
  810.     of X3.9-1978 FORTRAN.
  811.  
  812. But this does not mean that all "77" codes will port sans changes.
  813. Many (if not most) programmers employed constructs beyond the '77
  814. standard, or rely on unspecified behavior (say, assuming that an OPEN
  815. of an existing file will position the file pointer to just past the
  816. last record already written) which has changed (that is to say, has
  817. become specified). 
  818.  
  819. This leads to the obvious question, what is new in Fortran 90?
  820.  
  821. A complete answer would require considerable text. Some of the most
  822. obvious additions are:
  823.  
  824.     1) array notation (operators, etc.)
  825.     2) dynamic memory allocation
  826.     3) derived types and operator overloading
  827.     4) keyword argument passing, INTENT (in, out, inout)
  828.     5) modules
  829.     6) modern control structures
  830.     7) free format source code form
  831.     8) other stuff
  832.  
  833. While it is always tricky to characterize the motives of a large group
  834. of people, I <khb> am inclined to try as follows:
  835.  
  836.    '90 incorporates two sets of improvements: (1) relatively minor
  837.    fixups that *could* have been done earlier (2) relatively major
  838.    changes to enable better software engineering practices.
  839.  
  840. Sometimes a "minor" fixup has major effect, such as addition of free
  841. form source form combined with canonization of the MIL-STD 1753
  842. INCLUDE. 
  843.  
  844. I further go off on a limb and assert that it was the goal of the
  845. *committee* to evolve Fortran in a fashion to enable it to continue to
  846. be the premier language for scientific computation.
  847.  
  848.  
  849. Q10) My compiler is mis-behaving; who enforces the standard?
  850.  
  851.     ANSI and ISO standards do not usually have a particular enforcement
  852.     mechanism. Local bodies sometimes do. 
  853.  
  854.     However, it should be borne in mind that if *your* source code is
  855.     not standard compliant there is *NO* obligation for a FORTRAN ('77
  856.     and before) compiler to do  *ANYTHING* in particular. In Fortran (90)
  857.     the text in "constraints" must be tested and a warning produced
  858.     (compiler option can be used to evade this, of course).
  859.  
  860.     Some (notably Guy Steele, with respect to another standard) have
  861.     noted that when non-standard complying code is encountered, a
  862.     compiler may do *ANYTHING* including initation of Global Warfare.
  863.     Keep this in mind.
  864.  
  865.     When you do find a bona fide compiler bug, you are generally best
  866.     served by reporting it to the *vendor*. If you neglect to tell the
  867.     vendor, how can you complain about it not being fixed?
  868.  
  869.     When reporting a *suspected* bug be sure to be quite specific
  870.     about the computer system, operating system rev level (patches
  871.     applied if known) and *compiler*version* (and patches thereof).
  872.     It is very hard for people to read your mind; but they will try. 
  873.     The attempts are often entertaining, sometimes helpful, but always
  874.     an inefficient use of people-time and net-bandwidth.
  875.  
  876.     Also note that it is generally helpful if you cut down the example
  877.     to the smallest size you can. Vendors are developers too; the
  878.     tendency is invest time/money where one can get the biggest bang
  879.     for the buck. 
  880.     
  881.  
  882. Q11) What are good books on Fortran? 
  883.  
  884.     Don't know if they are good. Inclusion in the list is not
  885.     endorsement.  Have misplaced name of the compiler of the 
  886.     original list <sorry>
  887.  
  888.  
  889. Author                         Title                                     Year
  890. Kruger                   Efficient Fortran Programming          1990
  891. Mojena/Ageloff                 FORTRAN 77                                 1990
  892. Metcalf/Reid                   FORTRAN 90 EXPLAINED                       1990
  893. Boyle                          FORTRAN 77 PDQ                             1989
  894. Bezner                         FORTRAN 77                                 1989
  895. Tremblay                       PROGRAMMING IN FORTRAN 77                  1988
  896. Salmon                         ... ENGINEERS & SCIENTISTS WITH FORTRAN 77 1988
  897. Nyhoff/Leestma                 FORTRAN 77 FOR ENGINEERS & SCIENTISTS      1988
  898. McCracken/Salmon               ... ENGINEERS & SCIENTISTS WITH FORTRAN 77 1988
  899. Davis/Hoffman                  FORTRAN 77: A STRUCTURED DISCIPLINED STYLE 1988
  900. Barnard/Skillicorn             FORTRAN 77 FOR ENGINEERS AND SCIENTISTS    1988
  901. Mashaw                         PROGRAMMING STRUCTURED FORTRAN 77          1987
  902. Cole                           FORTRAN 77: A STRUCTURED ... APPROACH      1987
  903. Boillot                        UNDERSTANDING FORTRAN-77                   1987
  904. Starkey/Ross                   FUNDAMENTAL PROGRAMMING WITH FORTRAN 77    1986
  905. Rouse/Bugnitz                  INTRODUCTION TO FORTRAN 77                 1986
  906. Ratzer                         FORTRAN 77 COURSE                          1986
  907. Page                           FORTRAN 77 FOR HUMANS                      1986
  908. Lehman                       ... SOCIAL SCIENCES: ALGORITHMS & FORTRAN 77 1986
  909. Smith                          FORTRAN 77: A PROBLEM-SOLVING APPROACH     1985
  910. Shelly                         FORTRAN 77: AN INTRODUCTION                1985
  911. Nickerson                      FUNDAMENTALS OF FORTRAN 77 PROGRAMMING     1985
  912. Metcalf                        EFFECTIVE FORTRAN 77                       1985
  913. McKeown                        STRUCTURED PROGRAMMING USING FORTRAN 77    1985
  914. Hume                           FORTRAN 77 FOR SCIENTISTS & ENGINEERS      1985
  915. Dillman                        PROBLEM SOLVING WITH FORTRAN 77            1985
  916. Brainerd                       FORTRAN 77 FUNDAMENTALS AND STYLE          1985
  917. Borse                          FORTRAN 77 & NUMERICAL METHODS FOR ENGINEERS1985
  918. Adman                          FORTRAN 77 SOLUTIONS NON-SCIENTIFIC PROBS. 1985
  919. SSI, Inc. Staff                FORTRAN 77 REFERENCE                       1984
  920. Etter                          PROBLEM SOLVING WITH STRUCTURED FORTRAN 77 1984
  921. Etter                          PROBLEM SOLVING USING FORTRAN 77            ?
  922. Dyck                           FORTRAN 77: A STRUCTURED APPROACH ...      1984
  923. Chivers/Clark                  FORTRAN 77: A HANDS ON APPROACH            1984
  924. Adman                          FORTRAN 77 FOR NON-SCIENTISTS              1984
  925. Willamson/Levesque           * A GUIDEBOOK TO FORTRAN ON SUPERCOMPUTER   1989
  926. Rule                           FORTRAN 77: A PRACTICAL APPROACH          1983
  927. Rouse/Bugnitz                  PROGRAMMING THE IBM PC: FORTRAN 77        1983
  928. Nyhoff/Leestma                 PROBLEM SOLVING WITH FORTRAN 77           1983
  929. Marateck                       FORTRAN 77                                1983
  930. Lehmnkuhl                      FORTRAN 77                                1983
  931. Law                            ANSI FORTRAN 77: INTRO. TO SOFTWARE DESIGN 1983
  932. Holoien/Behforooz              ... STRUCTURED PROGRAMMING WITH FORTRAN 77 1983
  933. Grout                        FUNDAMENTAL ... PROGRAMMING USING FORTRAN 77 1983
  934. Fleming/Redish                 THE U. S. MC MASTER GLOSSARY OF FORTRAN-77  1983
  935. Cole                           ANSI FORTRAN IV WITH FORTRAN 77 EXTENSIONS  1983
  936. Wu                             ANSI FORTRAN IV & 77 AND BUSINESS PROGRAMS  1982
  937. Pollack                        STRUCTURED FORTRAN 77 PROGRAMMING           1982
  938. Katzan                         FORTRAN 77                                  1982
  939. Gibson/Young                  INTRODUCTION TO PROGRAMMING USING FORTRAN 77 1982
  940. Ellis                         STRUCTURED APPROACH FORTRAN 77 PROGRAMMING   1982
  941. Durgin                        FORTRAN 77                                   1982
  942. Nanney                        A PROBLEM-SOLVING APPROACH USING FORTRAN 77  1981
  943. Merchant                      FORTRAN 77: LANGUAGE AND STYLE               1981
  944. Khailany                      BUSINESS PROGRAMMING FORTRAN IV/ANSI FORTRAN 1981
  945. Ashcroft                      PROGRAMMING WITH FORTRAN 77                  1981
  946. Wagener                        FORTRAN 77                                    ?
  947. Wagener                       PRINCIPLES OF FORTRAN 77 PROGRAMMING         1980
  948. Meissner/Organick             FORTRAN 77 FEATURING STRUCTURED PROGRAMMING  1980
  949. Hume/Holt                     PROGRAMMING FORTRAN 77                       1979
  950. Balfour                       PROGRAMMING IN STANDARD FORTRAN 77           1979
  951. Brainerd               Programmer's guide to Fortran 90            1990
  952. Adams et al                   Fortran 90 Handbook                         1991
  953. Counihan                      Fortran 90                                  1991
  954. O'Reilly&Assoc              Unix for FORTRAN Programmers                1990
  955.  
  956. Q12) Are there pretty printers for FORTRAN?
  957.  
  958.     Yes. 
  959.  
  960.     One such is SPAG:  OTG <usa> voice 717 222 9100  fax   717 229 9103
  961.     Authors are   
  962.  
  963.            Polyhedron Software Ltd
  964.            Magdalen House
  965.            98 Abingdon Road
  966.            Standlake
  967.            Witney
  968.            Oxon OX8 7RN
  969.  
  970.            Tel 0865 300 579
  971.  
  972.      part of their plusFORT product.
  973.            
  974.  
  975.     Another is Fortran development Tools from  Quibus 714 527 1384
  976.  
  977.     Also FOR_STRUC from cobalt-blue. 404 518 1116
  978.  
  979.     These more than pretty print, they optionally restructure your
  980.     code (duplicating code as needed to tidy up strange GOTO lists,
  981.     turning them into IF-THEN chains, and etc.).
  982.  
  983.  
  984. From: dappel@grafted.UUCP (Dave Appel)
  985. Newsgroups: comp.lang.fortran
  986. Subject: Re: code beautifier wanted
  987. Date: 4 Mar 92 21:30:25 GMT
  988. Organization: GRAFTED, Central Indiana's Usenet BBS 317-881-4369
  989.  
  990. wg@cbnewsm.att.com (Bill Gieske) writes:
  991. > I have tons of old FORTRAN code, most of it in upper case, the majority
  992. > of it not indented.  Is there a code beautifier, either PD or $$ that I
  993. > can run the code through to improve the readability, hence the main-
  994. > tainability?
  995. > Reply to me direct.  I will summarize if appropriate.
  996. > Bill Gieske
  997. > AT&T Bell Laboratories
  998. > wg%alux2@att.research.com
  999.  
  1000.      Call "The Connection at 800-336-1166"  and ask for
  1001. their software catalog.
  1002.  
  1003.      In their catalog that I have, Sprint 1992, there is an
  1004. ad on page 39 from AutoCASE Technology.  They have
  1005. a product called "AutoFLOW-FORTRAN" that lists for $1,995.
  1006. It claims to automatically document your existing source code.
  1007. AutoCASE's number is 408-446-2273.
  1008.  
  1009.       On page 93 is an ad from POWERLINE Software Inc.
  1010. Their number is 800-257-5773, 206-623-9204.  They offer
  1011. a product called SOURCE PRINT+, which they call a code
  1012. management tool with "multi-style formatting with structured
  1013. code blocking."  
  1014.  
  1015. They have a Fortran/Basic version for $169, and a Delux
  1016. Multi-language version for $249.  This program is for
  1017. DOS (MS-DOS presumably) Windows, and OS/2.
  1018.  
  1019. Hope this helps.
  1020.  
  1021. --
  1022. Dave Appel
  1023. The Grafted Branch BBS
  1024. 317-881-4369
  1025. internet: dappel@grafted.UUCP
  1026. uucp: ..!uunet!grafted.UUCP!dappel
  1027.     -= newsfeeds available, contact robert@towers.rn.com =-
  1028.  
  1029. Hindsight/Fortran
  1030.  
  1031.         Summary:
  1032.  
  1033.     Features include the ability to draw an interactive structure
  1034.     chart and display coverage, software complexity and
  1035.     performance information on the structure chart. There are also
  1036.     code tracing features, for instance 3 logic diagrams are
  1037.     produced. Common blocks can be traced through the structure
  1038.     charts, including specific variables within common blocks.
  1039.     Hindsight is excellent for documentation, code inspection, and
  1040.     bringing new software engineers up to speed on new code. 
  1041.  
  1042. For more information or a free demo copy, contact:
  1043.  
  1044. Dan Zimmerman,  National Account Manager
  1045. Advanced Software Automation, Inc.
  1046. 3130A Coronado Dr
  1047. Santa Clara, 95054
  1048.  
  1049. Phone: 408 492-1668  Fax: 408 492-1669
  1050.  
  1051. Email: zimme@hindsight.com 
  1052.  
  1053. Alternative contact (if Dan cannot be reached:
  1054.                 manny@hindsight.com (John Mansperger)
  1055.  
  1056.  
  1057. Hindsight/FORTRAN Version 1.0 features
  1058.  
  1059. Hindsight/FORTRAN Version 1.0 is a fully integrated software
  1060. maintenance, testing, and re-engineering environment which addresses
  1061. many problems of the software development cycle, from design to
  1062. maintenance.
  1063.  
  1064. Hindsight/FORTRAN Version 1.0 parses FORTRAN source code, decomposes
  1065. system structure, and from this analysis, produces a single database
  1066. from which all of Hindsight's charts, diagrams and reports are
  1067. produced.  The results of Hindsight's analysis is a detailed picture
  1068. of the static structure of the software system, a representation of
  1069. the common and local data, and connections to the dynamically
  1070. collected run-time data.  From this, Hindsight generates active
  1071. structure charts where the user can isolate logical subtrees to
  1072. analyze both the parents and the children of a selected function.
  1073. Hindsight collects and analyzes performance, complexity, and test
  1074. coverage data.  With the structure chart, the user can display this
  1075. data in a graphical and easy to use format.  From the structure chart,
  1076. the user can edit multiple functions at a time without having to
  1077. specify the file or directory path where the file exists.  Hindsight
  1078. even displays the use of common blocks on the structure chart.
  1079. Lastly, Hindsight generates logic diagrams for the entire program,
  1080. provides point-and-click tracing between high-level and detailed logic
  1081. with active line numbers, and generates over fifty detailed reports.
  1082.  
  1083. All capabilities mentioned above are integrated in a menu
  1084. driven environment utilizing the OpenLook or Motif Graphical User
  1085. Interface. Engineers only need to specify a list of source files to be
  1086. analyzed and select the operation and parameters for their purposes.
  1087. Hindsight provides the ability for multiple diagrams and reports to be
  1088. produced simultaneously during a single Hindsight session.
  1089.  
  1090. Hindsight/FORTRAN Version 1.0 provides an innovative technique to
  1091. graphically represent a software system. The structure chart reflects
  1092. the system structure, from which the user can get a clear overview of
  1093. the program being examined. Hindsight also allows the user to view or
  1094. edit the original code with a click on any subprogram box in the
  1095. structure chart.  A major time-saving advance is Hindsight's ability
  1096. to reanalyze an edited function and update the structural database
  1097. without reanalyzing the entire system.  The J-Diagram and ActionPlus
  1098. diagram are two graphical representations of the logic in a software
  1099. system and can contain a single module or the entire system.  Both
  1100. diagrams utilize the active line number technique to link high-level
  1101. module calls with detailed module logic.  Hindsight also actively
  1102. links computed GOTO statements with their destination labels by
  1103. clicking on the label.  Users can walk through programs and trace the
  1104. logic without having to memorize the directories and files where
  1105. subprograms are defined and called. This technique saves a great deal
  1106. of the users time.
  1107.  
  1108. Hindsight/FORTRAN Version 1.0 has many integrated automated tools to
  1109. generate documents either on-screen or on paper. Because the documents
  1110. are automatically generated, they can be updated as soon as engineers
  1111. have modified their source code.  This approach guarantees the
  1112. consistency between the design documents and the source code.  The
  1113. updated and correct documents will be of great value in maintaining
  1114. and improving software products.  These documents are available
  1115. on-line to the user and readily accessible through Hindsight's
  1116. interactive report mechanism.
  1117.  
  1118. Hindsight Version 1.0 has the ability to provide segment or line test
  1119. coverage data.  Hindsight generates test coverage data and displays
  1120. the data on the structure chart in a statistical way.  Hindsight can
  1121. also display the precise location of testing deficiencies on the
  1122. J-Diagram, which helps engineers find the exact part of the program
  1123. where the code has not been tested. Hindsight's ability to display
  1124. performance data, complexity metrics, and test coverage data on charts
  1125. and diagrams play an important role in controlling program quality.
  1126.  
  1127. Hindsight/FORTRAN Version 1.0 uses a new notation for the J-diagram
  1128. which accommodates branch test coverage capability.  The new notation
  1129. has a better and more precise method of showing control levels,
  1130. complexity, and segment number counting.  The branch test coverage
  1131. data generation and display is a great enhancement for test coverage
  1132. analysis.  Hindsight's branch test coverage is able to detect
  1133. invisible branches, finding more problems that would otherwise be
  1134. hidden in programs.  With this information, users can add test cases
  1135. for covering the untested code.
  1136.  
  1137. Hindsight/FORTRAN Version 1.0 contains the ability to speed up the
  1138. development process by generating a specific order for coding the
  1139. modules of a users system.  By analyzing a group of modules containing
  1140. nothing more than empty shells of subprograms that call the other
  1141. subprograms in the system, Hindsight generates the coding order for
  1142. the modules to ensure that the process will be testable with the use
  1143. of a single driver process and without the need to stub out uncoded
  1144. subprograms.  The bottom-up coding approach saves time that would be
  1145. wasted coding unneeded stubs.  As development proceeds, Hindsight's
  1146. ability to verify that calls to other subprograms are utilizing the
  1147. proper interface will also save time and improve program quality.
  1148.  
  1149. Other tools:
  1150.  
  1151.               Refine/FORTRAN  ("re-engineering tool")
  1152.         Reasoning Systems Inc
  1153.         415 494 6201
  1154.  
  1155.         FORM (graphical interface to toolpack)
  1156.         University of Kent 44 227 762811
  1157.  
  1158.  
  1159.         pub/fortran/fxref.tar.Z from biome.bio.ns.ca.
  1160.         create cross reference of a FORTRAN program.
  1161.  
  1162.         CLEAN77 available from Purdue University.
  1163.         Mail Greg Flint (afc.klaatu.cc.purdue.edu) for more info.
  1164.  
  1165.         There is a program called TIDY that is available via
  1166.         FTP from simtel20  pub/msdos/fortran/tidy621.zip on
  1167.         oak.oakland.edu 
  1168.  
  1169. Q13) Why are there aimless debates?
  1170.  
  1171.     There are some  persistent individuals who would like computer systems
  1172.     to work in a fashion somewhat unlike they do now. It seems pointless
  1173.     to debate with them; the debates (in various groups) always take
  1174.     the same form and never result in meaningful dialog.
  1175.  
  1176.     One can usually recognize such by reading a week or so's worth of
  1177.     postings. Sometimes you may have to read for a month to recognize
  1178.     such. When you do, please try to avoid triggering (or responding to)
  1179.     such individuals. 
  1180.  
  1181.     Many (if not most) newsreaders support a feature entitled KILL files.
  1182.     As you recognize individuals, you may wish to put them into your
  1183.     local kill file. For example, the style employed by GNUS:
  1184.  
  1185.     (gnus-kill "From" "hrubin@pop.stat.purdue.edu")
  1186.     (gnus-kill "Subject" "test")
  1187.  
  1188.     the first kills off all postings from the named individual,
  1189.     the second kills off all postings including the beloved "test" string.
  1190.     See your local NewsGod for details suitable for your local system.
  1191.     
  1192. Q14) How do I call f77 from C (and visa versa)
  1193.      This is quite platform dependent. For Suns see the FORTRAN User's
  1194.      Guide, Chapter 14.
  1195.  
  1196.     There is a package available from usenet which attempts to make
  1197.     this "quick and easy" for a wide range of platforms:
  1198.  
  1199.    ftp.uu.net   (137.39.1.9) Location: /comp.sources.misc/volume20
  1200.       DIRECTORY rwxr-xr-x       512  Jun 27  1991   cfortran
  1201.  
  1202.    It is on many other sites (around the world) too. See archie if
  1203.    you need other pointers.
  1204.  
  1205.    For some systems, you have to initialize a runtime system explicitly
  1206.    if you call a different language, and stopping execution from the
  1207.    other program may not work.
  1208.  
  1209.     The most recent version of cfortran.h is available via anon. ftp at
  1210.     zebra.desy.de.
  1211.  
  1212.  
  1213. Q15) What constitutes good FORTRAN style?
  1214.  
  1215. One rendition of a FORTRAN 77 style guide is available through anonymous
  1216. ftp from ics.uci.edu (128.195.1.1).  To retrieve (please note that it's
  1217. not really "anonymous", that's just the Name that you'll be using):
  1218.  
  1219. % ftp ics.uci.edu
  1220. anonymous
  1221. <enter your e-mail address at Password: prompt>
  1222. cd pub/levine
  1223. ascii
  1224. get F77_Style_Guide
  1225. bye
  1226.  
  1227. If you can't access this site directly, please send an e-mail request to
  1228. levine@ics.uci.edu (BITNET: levine@uci, UUCP: ...!uunet!ucivax!levine).
  1229.  
  1230. Q16) For whatever reasons, I want to translate my Fortran into C.
  1231.     What tools are available?
  1232.  
  1233.     f90 from NAG, see above
  1234.     f2c see above.
  1235.  
  1236.     FORTRAN=C=FORTRIX=Rapitech Rapitech (914) 368-3000
  1237.     FORTRAN=C=FOR_C=Cobalt Blue  404 518 1116
  1238.     FORTRAN=C=PROMULA.FORTRAN=Promula (614) 263-5512
  1239.  
  1240. Q17) For whatever reasons, I want to translate my existing C code
  1241.      into Fortran. What tools are available?
  1242.  
  1243. Regretably none. This is indeed unfortunate, as even a limited
  1244. translator could help with typical C header files.
  1245.  
  1246. Q18) What is preprocessing, how can it help? How can it hurt?
  1247.      
  1248. Preprocessing often refers to usage of a Macro-prepressor upon ones
  1249. source code prior to compilation. 
  1250.  
  1251.        How can this help?
  1252.  
  1253. It can make it easier to move code between machines.
  1254.  
  1255.        How can this hurt?
  1256.   
  1257. It can cause difficulties in compilation of the processed code; most (if
  1258. not all) macro-preprocessors know nothing about Fortran syntax and
  1259. code layout rules. So, a common problem is that after preprocessing
  1260. some text may be lost past "sacred" column 72. Those working with
  1261. compilers that optionally compile *past* line 72 should probably
  1262. employ that option when using a preprocessor.
  1263.  
  1264. Common prepressors are: cpp, m4, and ratfor. Many sites have their
  1265. own custom prepressors. Basic functions are:
  1266.  
  1267.     1) definition of a symbol
  1268.     2) conditional code selection based on a symbol
  1269.     3) substition of a symbol by its definition
  1270.  
  1271. Traditional BSD Unix f77 processors treat a file named foo.F (as
  1272. opposed to foo.f) as one that should be run through cpp prior to
  1273. compilation "automatically".
  1274.  
  1275. Q19) How can I convert an existing FORTRAN 77 program to the free form
  1276.      source of Fortran 90?
  1277.  
  1278. A program to do this, CONVERT, may be obtained by sending a request
  1279. to metcalf@cernvm.cern.ch.
  1280.  
  1281. Q20) Who creates these silly standards anyway?
  1282.  
  1283. Typically X3J3. X3J3 is an ANSI subcommittee dedicated to Fortran. WG5
  1284. is the ISO counterpart. WG5 owns responsibility for Fortran on an
  1285. international basis. WG5 has previously tasked X3J3 to do the work.
  1286. This arrangement continues.
  1287.  
  1288. WG5 is composed of Fortran users, vendors, and academics from several
  1289. ISO supporting nations. Delegates represent *their*countries* not
  1290. their companies; so several delegates from a single company is
  1291. permitted. 
  1292.  
  1293. ANSI rules prohibit multiple voting delegates from the same company.
  1294. X3J3 is composed of users (aerospace, government labs, military, DECUS,
  1295. railroads, oil to name a few), vendors (IBM, CRI, Sun, Convex, DEC,
  1296. UNISYS, to name a few) and the odd academic (oxford, yale, liverpool, to
  1297. name a couple). Members need not be US citizens nor must their company
  1298. be US domiciled. Being a member of a standards group is typically
  1299. involves non-trivial work. To be effective, one should plan on at
  1300. least 8 weeks of time per year (those who are really doing the hard
  1301. work do far more). This time commitment is typically far more
  1302. expensive than the travel and membership costs.
  1303.  
  1304. X3J3 meetings are open to the public. There are typically 4 meetings a
  1305. year, typically 3 are in the US and 1 *may* be overseas (to precede or
  1306. follow the WG5 plenary session). Membership fees are levied by ANSI,
  1307. and are on the near order of $400 (plus an extra $300ish for those who
  1308. wish to be members of the US delegation to ISO). In addition,
  1309. attendees to a particular X3J3 meeting pay a "meeting fee" which
  1310. covers reproduction costs, snacks and etc.
  1311.  
  1312. WG5 has established various goals and targets for future work. Roughly
  1313. speaking 5yrs rather than 13years are the targets for future work.
  1314.  
  1315. Current work projects include cleanup and interpretations of Fortran
  1316. (90), features for future versions of the standard (e.g. parallel
  1317. processing, "object-oriented" technologies, etc.). In addition to work
  1318. done directly by X3J3, there is work on standardized modules, and OS
  1319. bindings taking place in other organizations. X3J3 would like to keep
  1320. track of such efforts, those involved are invited to inform X3J3 early
  1321. in their development efforts if possible. X3J3 is currently working
  1322. with X3H5, DIN (varying string character) and tracking the efforts of
  1323. HPFF. 
  1324.  
  1325. New members are always welcome. Visitors are also; though it is very
  1326. hard to get a good grip on things in only one meeting!
  1327.  
  1328. Contact the X3J3 chair or vice-chair for more information:
  1329.  
  1330.     jwagener@trc.amoco.com   chair
  1331.     mbsh@holstein.fc.hp.com  vice-chair
  1332.  
  1333. Upcoming meetings are:
  1334.  
  1335.      9 Nov - 13 Nov  New Haven (Yale)
  1336.      8 Feb - 12 Feb  Ft. Lauderdale (Harris)
  1337.  
  1338. Q21) How can I read my VAX binary data somewhere else?
  1339.  
  1340.      Some vendors provide bulit in methods (DEC provides this via
  1341.      special options on the OPEN statement). Others provide library support 
  1342.      (on SPARC products, with the SunPro compilers, checkout convert_external)
  1343.      In addition, Accerl8 provides a commerial tool. Contact:
  1344.  
  1345.     Robert Hickler                            Tel   (303) 863-8088
  1346.     Accelr8 Technology                        Email robert@accelr8.com
  1347.  
  1348.      for more information.
  1349.  
  1350. The following three Q's and A's based on email from:
  1351.     ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig) 
  1352.  
  1353. Q22) My F77 program compiled ok on a <system1>, but gives me heaps of
  1354.      syntax errors on a <system2>. What's wrong?
  1355.  
  1356.      Most likely, the program was written with a line length greater than
  1357.      72. If your compiler supports it, turn on the option for greater
  1358.      line length (e.g. -e is not uncommon) ; otherwise, split up the
  1359.      lines by hand, or via one of those pretty-printers/restructing
  1360.      tools mentioned above.
  1361.  
  1362. Q23) My F77 program ran ok on a <system1>, but on a <system2> it just gives
  1363.      me strange results. What's wrong?
  1364.  
  1365.      There are different reasons why this could be. Possibly, your program
  1366.      violates the standard in some way which is not caught by the compiler
  1367.      on <system1>.
  1368.      
  1369.      Many programs rely on variables to be initialized to zero when a
  1370.      subroutine or function is first called, and also on the retention
  1371.      of values between calls. While many compilers (VAX/VMX and IBM VS,
  1372.      for example) exhibit this behaviour, compilers on newer
  1373.      architectures often fill variables with garbage on each new
  1374.      function call. This is permitted, according to the standard.
  1375.  
  1376.      Initialize variables explicitly, and put the variables which you need
  1377.      to keep across function calls into SAVE statements. Your compiler may
  1378.      have an option to trap unititialized variables; use that to find the
  1379.      trouble spots. Alternatively, compile using a flag which forces
  1380.      static allocation of all variables.
  1381.  
  1382.      Another problem might be that the accuracy of REAL and DOUBLE
  1383.      PRECISION differs between different platforms; that can cause
  1384.      roundoff error to wipe out your results or your program to go
  1385.      into endless loops.
  1386.  
  1387.      Yet another (and much more subtle) problem can occur if a lot of
  1388.      formatted I/O is employed. The conversion from internal to
  1389.      external representations can introduce very significant errors;
  1390.      much worse on some platforms than others (doing correctly rounded
  1391.      base conversion is expensive). 
  1392.  
  1393.      There are, of course, lots of other possibilities, these are just
  1394.      a starting point.
  1395.  
  1396. Q24) Is there a WEB for Fortran (and what is web anyway)?
  1397.  
  1398.      fweb is available via anonymous ftp; use archie(above) to
  1399.      determine current location(s).
  1400.  
  1401.      As for the more general question, what is WEB .... WEB is a
  1402.      "literate" programming system created by Knuth (he of reference
  1403.      book fame, and TeX fame, and etc.). It permits the programmer to
  1404.      write code and documentation together. WEB takes the "high level
  1405.      code and documentation" and creates real publishable
  1406.      documentation (using TeX or LaTeX) and compilable code. WEB
  1407.      versions for many languages are available.
  1408.  
  1409. Q25) Where can I find coded BLAS (and what are coded BLAS?)
  1410.  
  1411. The BLAS (basic linear algebra software) comes in several flavors:
  1412. BLAS-1, -2, and -3. These can be described as scalar, vector and
  1413. matrix-matrix levels. "Coded" BLAS are either hand coded in assembler,
  1414. or at least tweaked for a given machine. Some vendors provide these,
  1415. some are provided on the net (see archie) and some are marketed by
  1416. various commercial organizations. 
  1417.  
  1418. In addition, it should be noted that BLAS-3 is very amenable to
  1419. parallel processing. Done cleverly, this could be done by a network of
  1420. processors over a net. DSS markets just such an implementation. Contact:
  1421.  
  1422.      Mike Boucher
  1423.     Dakota Scientific Software, Inc.
  1424.     501 East Saint Joseph Street
  1425.     Rapid City, SD  57701-3995
  1426.     fax: (605) 394-1256
  1427.     scisoft@well.sf.ca.us
  1428.  
  1429. for more information about their implementation.
  1430.  
  1431. Q26)  How common is DO ... END DO
  1432.  
  1433.       It is very common; and of course is part of Fortran 90.
  1434.       Compilers claimed to *not* support it (much shorter list this
  1435.       way)
  1436.  
  1437.               1) Salford ftn77/Primos version
  1438.         2) Prime f77 compiler
  1439.         3) Microsoft Fortran for CP/M 8080/Z80 machines    
  1440.         4) Fujitsu VPxxx UXP/M compiler
  1441.  
  1442.       
  1443. Q27) Where can I learn more about the history of Fortran?
  1444. From: metcalf@apofort.cern.ch (Michael Metcalf )
  1445. The history of Fortran is documented in:        
  1446.  
  1447. Annals of History of Computing, 6, 1, January, 1984 (whole issue).
  1448.  
  1449. Programming Systems and Languages (S. Rosen ed.), McGraw Hill, 1967, pp 29-47
  1450.     (this is Backus's original paper).        
  1451.  
  1452. History of Prorammining Languages (R.L. Wexelblat ed.), Academic Press, 1981,
  1453.               pp 25-74.    
  1454.  
  1455. A summary appears in vol. 5 of the Encyclopedia of Science and Technology,
  1456. Academic Press, 1986, under 'Fortran'. 
  1457. and in Chapter 1 of Fortran 90 Explained (Oxford, 1990).
  1458.  
  1459. Q28) Fortran text editors?
  1460.  
  1461. Thomas Koenig, ig25@rz.uni-karlsruhe.de, ig25@dkauni2.bitnet
  1462.       If you use EMACS, you can use M-x fortran-mode.  An extended
  1463.       version, which includes the fortran-auto-fill-mode minor mode, is
  1464.       available via anonymous ftp from hallc1.cebaf.gov [129.57.32.62]
  1465.       in the directory /emacs.
  1466.  
  1467. More generally, Unipress emacs has a Fortran mode. There are XEDIT,
  1468. BRIEF, TPU and EDT clones available on many common platforms these
  1469. days. 
  1470. --
  1471. ----------------------------------------------------------------
  1472. Keith H. Bierman    keith.bierman@Sun.COM| khb@chiba.Eng.Sun.COM
  1473. SunPro 2550 Garcia MTV 12-40             | (415 336 2648) fax 964 0946
  1474. Mountain View, CA 94043  <speaking for myself, not Sun*> Copyright 1993
  1475.  
  1476.